{% extends 'base.html' %}
{% block body %}
    <table cellspacing="0">
        {% for post in posts %}
        <tr>
            <td class="post-count">{{ forloop.counter }}.</td>
            {% if user %}
                {% ifequal user post.nickname %}
                <td class="post-vote post-star">&#9733;</td>
                {% else %}
                <td class="vote post-vote"><a href="/upvote/post/{{ post.id }}">&#9650;</a><!-- &#9660; --></td>
                {% endifequal %}
            {% else %}
                <td class="post-vote post-star">&#9733;</td>
            {% endif %}
            <td class="post-title"><a href="/item/{{ post.id }}">{{ post.title|capfirst|truncatewords:"23" }}</a> &nbsp; - &nbsp; <span class="post-link">{{ post.url|urlize }}</span></td>
        </tr>
        <tr>
            <td class="post-date" colspan="2">&nbsp;</td>
            <td class="post-date small"><span class="post-points">{{ post.points }} point{{ post.points|pluralize }}</span> by {{ post.nickname }} {{ post.date|timesince }} ago</td>
        </tr>
        {% endfor %}
    </table>
{% endblock %}